package com.pig4cloud.pigx.contract.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 调整逐仓仓位保证金DTO
 *
 * @date 2022/9/2 14:52
 */
@Data
public class AppContractMarginChangeDTO implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 仓位id
	 */
	@ApiModelProperty(value = "仓位id", required = true)
	@NotNull(message = "数据异常，positionId为空")
	private Long positionId;

	/**
	 * 操作类型（0加、1减）
	 */
	@ApiModelProperty(value = "操作类型（0加、1减）", required = true)
	@NotBlank(message = "数据异常，calculationType为空")
	private String calculationType;

	/**
	 * 变化金额
	 */
	@ApiModelProperty(value = "变化金额", required = true)
	@NotNull(message = "数据异常，amount为空")
	private BigDecimal amount;
}
